//
// Created by 123 on 2025/1/2.
//
#include "iostream"
using namespace std;

class Animal{
public:
    int ma;
};

//继承前加virtual关键字后变成虚继承
class Sheep : virtual public Animal{};
class Tuo : virtual public Animal{};
class SheepTuo:public Sheep,public Tuo{

};

void test(){
    SheepTuo ss;
    ss.Sheep::ma = 100;
    ss.Tuo::ma = 200;
    cout << ss.Sheep::ma << endl;
    cout << ss.Tuo::ma << endl;
    cout << ss.ma << endl;
}

int main084(){
    test();

    return 0;
}